package com.example.helloworld;

public class RegexDemo {
    public static void main(String[] args) {
        String str = "Hello World";
        String pattern = ".*World.*";
        if(str.matches(pattern)){
            System.out.println("Match found");
        } else {
            System.out.println("Match not found");
        }
    }
}
